Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Harden use of geth #15029

Merged
merged 1 commit into from
Aug 15, 2018
Merged

Harden use of geth #15029

merged 1 commit into from
Aug 15, 2018

Conversation

mrose17
Copy link
Member

@mrose17 mrose17 commented Aug 15, 2018

  • catch “unlikely” but possible errors
  • handle SIGHUP an dSIGINT

- catch “unlikely” but possible errors
- handle SIGHUP an dSIGINT
@@ -104,29 +106,34 @@ const spawnGeth = async () => {
}

const gethOptions = {
stdio: process.env.GETH_LOG ? 'inherit' : 'ignore'
stdio: ((envNet === 'ropsten') || process.env.GETH_LOG) ? 'inherit' : 'ignore'
Copy link
Contributor

@ryanml ryanml Aug 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this included intentionally? i think that would should let GETH_LOG be the sole deciding indicator for logging, lest there is value in always having debug output on ropsten

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. it's intentional: if someone is on the test network, or someone turns on GETH_LOG, then we get logs, otherwise not. in other words, for production use, no logs by default; for testnet use, logs by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

process.on('exit', cleanupGeth)
process.on('SIGHUP', cleanupGethAndExit)
process.on('SIGTERM', cleanupGethAndExit)
process.on('SIGINT', cleanupGethAndExit)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for these ones ++

Copy link
Contributor

@ryanml ryanml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes work very well, thank you for hardening 👍

@mrose17 mrose17 merged commit aff1a96 into master Aug 15, 2018
@mrose17 mrose17 deleted the geth-sanity-updates branch August 15, 2018 05:33
ryanml pushed a commit that referenced this pull request Aug 15, 2018
ryanml pushed a commit that referenced this pull request Aug 15, 2018
@ryanml
Copy link
Contributor

ryanml commented Aug 15, 2018

master aff1a96
0.24.x 84b416b
0.23.x 9949c3a

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants